package com.yunxi.poc.starbucks.service;

import com.yunxi.poc.starbucks.entity.Tb1Store;
import com.yunxi.poc.starbucks.vo.StoreRateVO;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 店面拥挤度计算-服务类
 * </p>
 *
 * @author shiyuan.xlc
 * @since 2021-08-12
 */
public interface IScrowdedService {

    /**
     * 计算店面拥挤度
     *
     * @param store
     * @param current
     * @return
     */
    double scoreScrowded(Tb1Store store, LocalDateTime current, StoreRateVO calRes);

    /**
     * 门店 n 天的产能
     *
     * @param current
     * @param store
     * @param days
     * @return
     */
    double efficiency(LocalDate current, Tb1Store store, int days, StoreRateVO calRes);

    /**
     * 排队咖啡数量
     *
     * @param current
     * @param store
     * @param efficiency
     * @return
     */
    double waitingCoffee(LocalDateTime current, Tb1Store store, double efficiency, StoreRateVO calRes);

    /**
     * 根据线上订单计算排队咖啡数量
     *
     * @param current
     * @param store
     * @param efficiency
     * @param calRes
     * @return
     */
    double waitingCoffeeByOnlineOrder(LocalDateTime current, Tb1Store store, double efficiency, StoreRateVO calRes);

    /**
     * 根据订单队列模拟计算排队咖啡数量
     *
     * @param current
     * @param store
     * @param efficiency
     * @param calRes
     * @return
     */
    double waitingCoffeeByQueue(LocalDateTime current, Tb1Store store, double efficiency, StoreRateVO calRes);

    /**
     * 根据订单队列模拟计算排队咖啡数量：通过时间
     *
     * @param current
     * @param store
     * @param calRes
     * @return
     */
    double waitingCoffeeByQueueWithTime(LocalDateTime current, Tb1Store store, StoreRateVO calRes);

    /**
     * 动态获取产能
     *
     * @param orderDateTime
     * @param storeId
     * @return
     */
    double efficiencyDinamic(LocalDateTime orderDateTime, String storeId, LocalDateTime baseCapacityDate, List<LocalDate> businuessDays);
}
